#pragma once
#include <DXUTgui.h>

namespace grflib
{
	namespace engine
	{
		namespace aux
		{
			class CDialog
			{
			public:
				//ctor & dtor
				CDialog() : width(125), height(35), x(0), y(0), m_bVisible(true) {}
				CDialog(int _w, int _h, int _x, int _y) : width(_w), height(_h), x(_x), y(_y), m_bVisible(true) {}
				~CDialog() {}

				//set appearance
				void SetDimension(int _w, int _h, int _x, int _y);
				CDXUTDialog &GetDialog(void) {return m_dialog;}

				void ToggleVisibility(void);

				//render loop
				HRESULT OnResize(ID3D10Device *pd3dDevice, IDXGISwapChain *pSwapChain, const DXGI_SURFACE_DESC *pBufferSurfaceDesc);
				bool MsgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
				virtual HRESULT OnRender(ID3D10Device *pd3dDevice, const D3DXMATRIX *pWorldMat, double fTime, float fElapsedTime, UINT pass);

			protected:
				bool m_bVisible;
				CDXUTDialog m_dialog;
				int width, height;
				int x, y;
			};

		} //namespace aux
	} //namespace engine
} //namespace grflib

